package yrjdezu.abab.engineerpractice2.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yrjdezu.abab.engineerpractice2.common.context.BaseContext;
import yrjdezu.abab.engineerpractice2.domain.dto.FoldersDTO;
import yrjdezu.abab.engineerpractice2.domain.entity.Folders;
import yrjdezu.abab.engineerpractice2.mapper.FoldersMapper;
import yrjdezu.abab.engineerpractice2.service.IFoldersService;

/**
 * <p>
 * 文件夹表 服务实现类
 * </p>
 *
 * @author lzh
 * @since 2025-05-18
 */
@Service
public class FoldersServiceImpl extends ServiceImpl<FoldersMapper, Folders> implements IFoldersService {

    @Override
    public void save(FoldersDTO requestParam) {
        Folders folders = BeanUtil.toBean(requestParam, Folders.class);
        folders.setUserId(BaseContext.getCurrentId());
        save(folders);
    }
}
